<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<sx:head debug="true"/>
<title>菜单分配</title>
</head>

<body>
<p><s:property value="user.username"/> </p>
可用菜单
<hr />
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr bgcolor="#6699FF">
    <th>名称</th>
    <th>url</th>
    <th>&nbsp;</th>
  </tr>
  <s:if test="available_menuList.size > 0">
  <s:iterator value="available_menuList">
  <tr bgcolor="#CCCCCC">
    <td>
<!--    	<input type="checkbox" name="checkbox" id="checkbox" />-->
    	<s:property value="name" />
    </td>
    <td><s:property value="url"/> &nbsp;</td>
    <s:url action="menu_assign" id="menuAssignUrl">
    	<s:param name="menuId" value="id"></s:param>
    	<s:param name="userId" value="user.id"></s:param>
    </s:url>
    
    <td>
       <s:a href="%{menuAssignUrl}">分配</s:a>
    </td>
  </tr>
  </s:iterator>
  </s:if>
</table>

<p></p>


已分配菜单
<hr />
<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr bgcolor="#6699FF">
    <th>名称</th>
    <th>url</th>
    <th>&nbsp;</th>
  </tr>
  <s:if test="assigned_menuList.size > 0">
  <s:iterator value="assigned_menuList">
  <tr bgcolor="#CCCCCC">
    <td>
<!--    	<input type="checkbox" name="checkbox" id="checkbox" />-->
    	<s:property value="name" />
    </td>
    <td><s:property value="url"/> &nbsp;</td>
    <s:url action="menu_unassign" id="menuUnAssignUrl">
    	<s:param name="menuId" value="id"></s:param>
    	<s:param name="userId" value="user.id"></s:param>
    </s:url>
    
    <td>
       <s:a href="%{menuUnAssignUrl}">取消</s:a>
    </td>
  </tr>
  </s:iterator>
  </s:if>
</table>
</body>
</html>

